// Copyright 2016 Palantir Technologies, Inc. All rights reserved.

@import "../../common/variables";
@import "../common";

.#{$ns}-table-null {
  color: $pt-text-color-disabled;
}

.#{$ns}-table-truncated-value {
  left: $pt-spacing * 2;
  max-height: 100%;

  overflow: hidden;
  position: absolute;
  // note: changing this value can throw off the width calculation in truncated popover
  right: $pt-spacing * 8.75;
  text-overflow: ellipsis;
  top: 0;
}

.#{$ns}-table-truncated-format-text {
  left: $pt-spacing * 2;
  max-height: 100%;

  overflow: hidden;
  position: absolute;
  // note: changing this value can throw off the width calculation in truncated popover
  right: $pt-spacing * 2.5;
  text-overflow: ellipsis;
  top: 0;
}

.#{$ns}-table-truncated-popover-target {
  border-radius: $pt-border-radius;
  bottom: 0;
  cursor: pointer;

  opacity: 0.3;

  padding: 0 $pt-spacing;
  position: absolute;
  right: $pt-spacing;
  text-align: center;
  top: 0;

  .#{$ns}-icon-standard {
    line-height: $cell-height;
  }

  &.#{$ns}-popover-open {
    opacity: 1;

    .#{$ns}-icon-standard {
      color: $pt-intent-primary;
    }
  }

  &:hover {
    opacity: 1;
  }
}

.#{$ns}-table-truncated-popover {
  font-family: $pt-font-family-monospace;
  max-height: $pt-spacing * 75;
  max-width: $pt-spacing * 150;
  min-width: $pt-spacing * 50;
  overflow: auto;
  padding: $pt-spacing * 2;
}

.#{$ns}-table-popover-whitespace-pre {
  white-space: pre;
}

.#{$ns}-table-popover-whitespace-normal {
  white-space: normal;
}
